//
// Created by lau on 2019-10-18.
//

#include <GLES2/gl2.h>
#include "framebuffer.h"
#include "utils/logutils.h"


namespace VideoEffect {

    FrameBuffer::FrameBuffer() {
        glGenFramebuffers(1, &mFboId);
        glBindFramebuffer(GL_FRAMEBUFFER, mFboId);

        GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
        if (status != GL_FRAMEBUFFER_COMPLETE) {
            VE_LOGE("Framebuffer not complete");
        } else {
            VE_LOGE("Framebuffer complete");
        }
        glBindFramebuffer(GL_FRAMEBUFFER, 0);
    }

}